package com.karst.webnotes.chapter03
{
	import flash.events.Event;
	
	import org.aswing.AsWingManager;
	import org.papervision3d.objects.primitives.Cylinder;
	import org.papervision3d.view.BasicView;
	
	internal class CylinderExample extends BasicView
	{
		public function CylinderExample()
		{
			super() ;
			createView() ;
			startRendering() ;
		}
		
		private var cylinder : Cylinder  = null ; // 平面
		private function createView() : void
		{
			if( cylinder == null )
				cylinder = new Cylinder( null, 80, 400, 8, 2, -1, false, true ) ;
			scene.addChild( cylinder ) ;
		}
		
		override protected function onRenderTick( event : Event = null ) : void
		{
			super.onRenderTick() ;
			if( cylinder )
				cylinder.localRotationX-- ;
		}
	}
}